import request from '@/utils/request'
export default {
    //1.新增课时的方法
    saveVideo(video) {
        return request({
            url: '/admin/edu/video/saveVideo',
            method: 'post',
            data: video
        })
    },
    //2.删除课时的方法
    deleteVideo(videoId) {
        return request({
            url: `/admin/edu/video/deleteVideo/${videoId}`,
            method: 'delete'
        })
    },
    //3.查询课时byId
    getVideoById(videoId) {
        return request({
            url: `/admin/edu/video/getVideo/${videoId}`,
            method: 'get'
        })
    },
    //4.更新课时
    updateVideo(video) {
        return request({
            url: `/admin/edu/video/updateVideo`,
            method: 'put',
            data: video
        })
    },
}